package tickets.tickets;

/**
 * Abstract class for all limitations for the ticket (limited number of
 * travels, expiration date), i.e. decorators for {@code baseTicket}. 
 * To get basic information about ticket (such as
 * id, type), method calls of this class are delegated to {@code baseTicket}.
 * 
 * @author Hlib_Babii
 */
public abstract class LimitedTicket extends Ticket {
    
    protected Ticket baseTicket;

    LimitedTicket(Ticket baseTicket) {
        super();
        this.baseTicket = baseTicket;
    }
    
    @Override
    public long getId() {
        return baseTicket.getId();
    }
    
    @Override
    public TicketType getType() {
        return baseTicket.getType();
    }
}
